<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增企业内应用')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-back-add">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">应用名称：</label>
                <div class="col-sm-8">
                    <input name="name" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">应用描述：</label>
                <div class="col-sm-8">
                    <textarea name="desc" class="form-control" rows="5" required></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">应用类型：</label>
                <div class="col-sm-8" th:with="type=${@dict.getType('sys_inner_app_type')}">
                    <label th:each="dict : ${type}" class="radio-box">
                        <input name="developType" type="radio" th:value="${dict.dictValue}" th:text="${dict.dictLabel}">
                    </label>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">首页地址：</label>
                <div class="col-sm-8">
                    <input name="homepageLink" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">PC端地址：</label>
                <div class="col-sm-8">
                    <input name="pcHomepageLink" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">管理后台地址：</label>
                <div class="col-sm-8">
                    <input name="ompLink" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">IP白名单：</label>
                <div class="col-sm-8">
                    <input name="ipWhiteList" class="form-control" type="text">
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "ding/innerApp"
        $("#form-back-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-back-add').serialize());
            }
        }
    </script>
</body>
</html>